<html>
<head><meta charset="utf-8"><title>Integration of the Cranelift backend with… compiler-team#270 · t-compiler/major changes · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/index.html">t-compiler/major changes</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html">Integration of the Cranelift backend with… compiler-team#270</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="212055600"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212055600" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> triagebot <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212055600">(Oct 02 2020 at 10:09)</a>:</h4>
<p><span class="user-group-mention" data-user-group-id="492">@T-compiler</span>: Proposal <a href="https://github.com/rust-lang/compiler-team/issues/270#issuecomment-702644684">#270</a> has been seconded, and will be approved in 10 days if no objections are raised.</p>



<a name="212055724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212055724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212055724">(Oct 02 2020 at 10:10)</a>:</h4>
<p>previous discussion: <a href="#narrow/stream/131828-t-compiler/topic/design%20meeting%202020-04-03%20compiler-team%23257/near/192806450">https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/design%20meeting%202020-04-03%20compiler-team%23257/near/192806450</a></p>



<a name="212055770"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212055770" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212055770">(Oct 02 2020 at 10:11)</a>:</h4>
<p>It's working well for clippy, and as long as <span class="user-mention" data-user-id="133247">@bjorn3</span> is the one syncing (and using the patched <code>git subtree</code>), there's no additional work on our side beyond keeping the backend building</p>



<a name="212057163"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212057163" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212057163">(Oct 02 2020 at 10:27)</a>:</h4>
<p>I got the patched git-subtree installed locally using <code>make prefix=$HOME/.local/; make prefix=$HOME/.local/ install; cd contrib/subtree; make prefix=$HOME/.local/; make prefix=$HOME/.local/ install</code>.</p>



<a name="212057315"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212057315" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212057315">(Oct 02 2020 at 10:28)</a>:</h4>
<p>I already have had a rust branch for the integration for a while now. It has a few things I want to change, but those should be easy.</p>



<a name="212063416"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212063416" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212063416">(Oct 02 2020 at 11:46)</a>:</h4>
<p>sorry for forgetting about this MCP for so long. I only saw it again yesterday in the compiler team meeting</p>



<a name="212063479"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212063479" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212063479">(Oct 02 2020 at 11:47)</a>:</h4>
<p>No problem. I was actually waiting for the <code>git subtree</code> PR to be merged, but that has been taking long enough.</p>



<a name="212063571"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212063571" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212063571">(Oct 02 2020 at 11:48)</a>:</h4>
<p>Should I submit a PR once it is ready, or wait for the fcp?</p>



<a name="212065179"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212065179" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212065179">(Oct 02 2020 at 12:08)</a>:</h4>
<p>let's wait for after the stable release next week, so we can also just wait for the FCP which is just a few days after that</p>



<a name="212065229"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212065229" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212065229">(Oct 02 2020 at 12:09)</a>:</h4>
<p>ok</p>



<a name="212218527"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212218527" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212218527">(Oct 04 2020 at 11:14)</a>:</h4>
<p><span class="user-mention silent" data-user-id="133247">bjorn3</span> <a href="#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270/near/212063479">said</a>:</p>
<blockquote>
<p>No problem. I was actually waiting for the <code>git subtree</code> PR to be merged, but that has been taking long enough.</p>
</blockquote>
<p>still waiting for that for Miri... I am somewhat worried about rust basically depending on a fork of git^^<br>
does anyone have contacts with upstream to figure out what it takes to get the PR through?</p>



<a name="212919288"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212919288" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212919288">(Oct 10 2020 at 14:49)</a>:</h4>
<p>cg_clif used to use <code>-Zcodegen-backend</code> to integrate with rustc. In <a href="https://github.com/rust-lang/rust/issues/76474">#76474</a> I introduced the alternative of using a custom driver. I ported most of cg_clif to use this interface as it makes it possible to always set certain options for cg_clif and allows adding extra arguments for for example enabling the jit mode instead of having to resort to env vars. As of <a href="https://github.com/bjorn3/rustc_codegen_cranelift/commit/faec12461f34db4145000a891c4ee5df2e8d4132">https://github.com/bjorn3/rustc_codegen_cranelift/commit/faec12461f34db4145000a891c4ee5df2e8d4132</a> the last remaining thing still requiring <code>-Zcodegen-backend</code> is rustdoc. Unlike rustc, rustdoc doesn't have support for custom drivers. How do I port it too?</p>



<a name="212919347"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212919347" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212919347">(Oct 10 2020 at 14:50)</a>:</h4>
<p>rustdoc uses drivers at all??</p>



<a name="212919355"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212919355" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212919355">(Oct 10 2020 at 14:51)</a>:</h4>
<p>It doesn't. That is the problem.</p>



<a name="212919371"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212919371" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212919371">(Oct 10 2020 at 14:51)</a>:</h4>
<p>librustdoc isn't included in the sysroot and only exports <code>main()</code>.</p>



<a name="212919390"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212919390" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212919390">(Oct 10 2020 at 14:52)</a>:</h4>
<p>I'm not sure what you're trying to do.</p>



<a name="212919438"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212919438" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212919438">(Oct 10 2020 at 14:53)</a>:</h4>
<p>I want to override the codegen backend used by rustdoc without passing <code>-Zcodegen-backend</code>. I want an executable that passes an <code>Box&lt;dyn CodegenBackend&gt;</code> and a list of arguments to rustdoc.</p>



<a name="212919482"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212919482" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212919482">(Oct 10 2020 at 14:54)</a>:</h4>
<p>By the way why does librustdoc actually exist separate from the rustdoc crate, when the rustdoc crate is just <code>fn main() { rustdoc::main() }</code>.</p>



<a name="212919508"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212919508" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212919508">(Oct 10 2020 at 14:55)</a>:</h4>
<p>For rustc I have <a href="https://github.com/bjorn3/rustc_codegen_cranelift/blob/master/src/bin/cg_clif.rs">https://github.com/bjorn3/rustc_codegen_cranelift/blob/master/src/bin/cg_clif.rs</a></p>



<a name="212919523"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212919523" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212919523">(Oct 10 2020 at 14:55)</a>:</h4>
<p><span class="user-mention silent" data-user-id="133247">bjorn3</span> <a href="#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270/near/212919482">said</a>:</p>
<blockquote>
<p>By the way why does librustdoc actually exist separate from the rustdoc crate, when the rustdoc crate is just <code>fn main() { rustdoc::main() }</code>.</p>
</blockquote>
<p>good question, I think it was something to do with compile times? <span class="user-mention" data-user-id="210316">@GuillaumeGomez</span> might know</p>



<a name="212919565"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212919565" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212919565">(Oct 10 2020 at 14:56)</a>:</h4>
<p><span class="user-mention silent" data-user-id="133247">bjorn3</span> <a href="#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270/near/212919438">said</a>:</p>
<blockquote>
<p>I want to override the codegen backend used by rustdoc without passing <code>-Zcodegen-backend</code>. I want an executable that passes an <code>Box&lt;dyn CodegenBackend&gt;</code> and a list of arguments to rustdoc.</p>
</blockquote>
<p>my question is where rustdoc gets a <code>CodegenBackend</code> from at all</p>



<a name="212919566"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212919566" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212919566">(Oct 10 2020 at 14:56)</a>:</h4>
<p>like, where does it use it currently?</p>



<a name="212919569"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212919569" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212919569">(Oct 10 2020 at 14:56)</a>:</h4>
<p><code>rustc_interface</code> has a default <code>CodegenBackend</code> that is cg_llvm.</p>



<a name="212919581"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212919581" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212919581">(Oct 10 2020 at 14:57)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/cae8bc1f2324e31c98cb32b8ed37032fc9cef405/compiler/rustc_interface/src/util.rs#L373">https://github.com/rust-lang/rust/blob/cae8bc1f2324e31c98cb32b8ed37032fc9cef405/compiler/rustc_interface/src/util.rs#L373</a></p>



<a name="212919638"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212919638" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212919638">(Oct 10 2020 at 14:58)</a>:</h4>
<p>ok, and why do you want to change that? I don't think rustdoc actually uses the codegen backend</p>
<div class="codehilite"><pre><span></span><code>(-bash@build-server) ~/rustc2 ▶️ rg get_codegen_backend src/librustdoc/ # no output
</code></pre></div>



<a name="212919643"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212919643" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212919643">(Oct 10 2020 at 14:58)</a>:</h4>
<p>It uses it for compiling tests.</p>



<a name="212919645"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212919645" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212919645">(Oct 10 2020 at 14:58)</a>:</h4>
<p>ahhh</p>



<a name="212919646"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212919646" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212919646">(Oct 10 2020 at 14:58)</a>:</h4>
<p>ok that's what I was missing</p>



<a name="212919660"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212919660" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212919660">(Oct 10 2020 at 14:59)</a>:</h4>
<p><code>get_codegen_backend</code> is called by <code>create_session</code> by the way.</p>



<a name="212919719"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212919719" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212919719">(Oct 10 2020 at 15:00)</a>:</h4>
<p>ok I have a follow-up question: rustdoc uses all the arguments of rustc, why doesn't <code>-Z codegen-backend</code> work too?</p>



<a name="212919746"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212919746" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212919746">(Oct 10 2020 at 15:01)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270/near/212919719">said</a>:</p>
<blockquote>
<p>ok I have a follow-up question: rustdoc uses all the arguments of rustc, why doesn't <code>-Z codegen-backend</code> work too?</p>
</blockquote>
<p>err actually let me double check that</p>



<a name="212919748"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212919748" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212919748">(Oct 10 2020 at 15:01)</a>:</h4>
<p>It does work</p>



<a name="212919799"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212919799" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212919799">(Oct 10 2020 at 15:02)</a>:</h4>
<p>then I'm again confused what your question is</p>



<a name="212919802"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212919802" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212919802">(Oct 10 2020 at 15:02)</a>:</h4>
<p>are we not propagating the backend to doctests?</p>



<a name="212919865"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212919865" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212919865">(Oct 10 2020 at 15:04)</a>:</h4>
<p>In the current state doctests do work fine. I want to create an executable that passes <code>-Ztrim-diagnostic-paths=no -Cpanic=abort -Zpanic-abort-tests -Zcodegen-backend='$(pwd)'/target/'$CHANNEL'/librustc_codegen_cranelift.'$dylib_ext' --sysroot '$(pwd)'/build_sysroot/sysroot</code> to rustdoc. Where preferably <code>-Zcodegen-backend</code> is passing an <code>Box&lt;dyn CodegenBackend&gt;</code>. These are all the flags necessary for cg_clif. This is necessary to make using cg_clif a matter of <code>RUSTC=cg_clif RUSTDOC=cg_clif_rustdoc cargo test</code>.</p>



<a name="212919887"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212919887" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212919887">(Oct 10 2020 at 15:05)</a>:</h4>
<p>The <code>RUSTC=cg_clif</code> part already works. The <code>RUSTDOC</code> part doesn't. Instead you need that long list of arguments in <code>RUSTDOCFLAGS</code>.</p>



<a name="212919931"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212919931" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212919931">(Oct 10 2020 at 15:06)</a>:</h4>
<p>you want a way to do this programmatically instead of through CLI args</p>



<a name="212919934"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212919934" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212919934">(Oct 10 2020 at 15:06)</a>:</h4>
<p>ok, I understand now</p>



<a name="212919937"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212919937" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212919937">(Oct 10 2020 at 15:06)</a>:</h4>
<p>Yes</p>



<a name="212920003"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212920003" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212920003">(Oct 10 2020 at 15:08)</a>:</h4>
<p>And preferably with an arbitrary <code>Box&lt;dyn CodegenBackend&gt;</code> instead of requiring <code>-Zcodegen-backend</code> to be passed. That makes it possible to pass in extra information to the codegen backend. For example it may be used to enable JITing  of tests instead of AOT compilation.</p>



<a name="212920099"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212920099" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212920099">(Oct 10 2020 at 15:10)</a>:</h4>
<p>it looks like the equivalent function for rustc is <code>        rustc_driver::run_compiler</code></p>



<a name="212920104"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212920104" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212920104">(Oct 10 2020 at 15:10)</a>:</h4>
<p>but rustdoc can't expose a function like that because it itself calls <code>run_compiler</code></p>



<a name="212920108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212920108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212920108">(Oct 10 2020 at 15:10)</a>:</h4>
<p>maybe it could expose a wrapper around it?</p>



<a name="212920135"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212920135" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212920135">(Oct 10 2020 at 15:11)</a>:</h4>
<p>I think so. That would require adding <code>librustdoc</code> to the sysroot.</p>



<a name="212920191"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212920191" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212920191">(Oct 10 2020 at 15:12)</a>:</h4>
<p>I don't have any objections in principle, but I wouldn't know where to start with that</p>



<a name="212920211"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212920211" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212920211">(Oct 10 2020 at 15:13)</a>:</h4>
<p>I can try it.</p>



<a name="212920221"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212920221" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212920221">(Oct 10 2020 at 15:13)</a>:</h4>
<p>I'll give the rest of the team a heads-up</p>



<a name="212921557"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212921557" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212921557">(Oct 10 2020 at 15:47)</a>:</h4>
<p>I just realized that adding librustdoc to the sysroot will require compiling it again for every stage.</p>



<a name="212968560"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212968560" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212968560">(Oct 11 2020 at 15:01)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270/near/212919523">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="133247">bjorn3</span> <a href="#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270/near/212919482">said</a>:</p>
<blockquote>
<p>By the way why does librustdoc actually exist separate from the rustdoc crate, when the rustdoc crate is just <code>fn main() { rustdoc::main() }</code>.</p>
</blockquote>
<p>good question, I think it was something to do with compile times? <span class="user-mention silent" data-user-id="210316">GuillaumeGomez</span> might know</p>
</blockquote>
<p>The idea is to allow to have different "front-end" to rustdoc in case you want to use librustdoc as a dependeny.</p>



<a name="212968614"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212968614" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212968614">(Oct 11 2020 at 15:03)</a>:</h4>
<p>I mean, in practice that's not reallly true because the only entry point is <code>rustdoc::main</code></p>



<a name="212968619"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/212968619" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#212968619">(Oct 11 2020 at 15:03)</a>:</h4>
<p>so you have to take the exactly the same arguments as <code>rustdoc</code></p>



<a name="213339218"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213339218" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> triagebot <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213339218">(Oct 14 2020 at 19:25)</a>:</h4>
<p>This proposal has been accepted: <a href="https://github.com/rust-lang/compiler-team/issues/270">#270</a>.</p>



<a name="213397693"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213397693" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213397693">(Oct 15 2020 at 09:08)</a>:</h4>
<p>I initially planned to expose cg_clif using -Zcodegen-backend. This would require several changes to bootstrap and rustc_interface to compile and load it. Recently I made a custom driver for cg_clif. This has the advantage that it can be integrated as a regular tool with an interface similar to miri, but it means that bootstrap can't use cg_clif as backend to compile later stages. Which one should I use?</p>



<a name="213397862"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213397862" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213397862">(Oct 15 2020 at 09:10)</a>:</h4>
<p>What do you think <span class="user-mention" data-user-id="116122">@simulacrum</span>, <span class="user-mention" data-user-id="124288">@oli</span>?</p>



<a name="213407466"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213407466" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213407466">(Oct 15 2020 at 10:53)</a>:</h4>
<p>I would prefer codgen-backend, so we have a single API. I do realize the API is not well suited for backends other than LLVM, but I think the whole point was always to adjust it to needs as they come</p>



<a name="213409299"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213409299" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213409299">(Oct 15 2020 at 11:15)</a>:</h4>
<p>The -Zcodegen-backend api is suitable for other backends, but it needs rustc changes to load from the sysroot instead of just from a path. It also needs a bootstrap change to put it in the right place.</p>



<a name="213410715"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213410715" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213410715">(Oct 15 2020 at 11:33)</a>:</h4>
<p>I think codegen-backend should be just fine. I'm not sure about the "loading from sysroot" bit - I recall intentionally removing some code there - but I think it should be fine. I'd not personally be opposed to linking rustc (optionally) directly with cranelift either</p>



<a name="213410726"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213410726" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213410726">(Oct 15 2020 at 11:33)</a>:</h4>
<p>(so we don't need to ourselves go searching in various directories)</p>



<a name="213410807"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213410807" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213410807">(Oct 15 2020 at 11:34)</a>:</h4>
<p>Directly linking it in won't work. <code>Cargo.toml</code> doesn't contain references for all <code>rustc_*</code> crates, so it has to load them from sysroot, which means that it has to be a separate build step.</p>



<a name="213411529"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213411529" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213411529">(Oct 15 2020 at 11:42)</a>:</h4>
<p>Hm, ok. I guess that's not something you want to change :)</p>
<p>I wish we already had support for = sysroot deps in cargo.toml, then we could do that sort of integration more easily.</p>



<a name="213416663"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213416663" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213416663">(Oct 15 2020 at 12:30)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> Can you take a look at <a href="https://github.com/rust-lang/rust/compare/master...bjorn3:cg_clif_subtree3">https://github.com/rust-lang/rust/compare/master...bjorn3:cg_clif_subtree3</a></p>
<p>This should work with the exception of needing to disable <code>lto</code> (otherwise the linking code omits all object files), disable the <code>nightly</code> feature of <code>parking_lot</code> (inline asm using <code>llvm_asm!</code>) and pass <code>-Ztrim-diagnostic-paths=no</code> when compiling using cg_clif (<a href="https://github.com/rust-lang/rust/issues/77458">#77458</a>).</p>



<a name="213417272"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213417272" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213417272">(Oct 15 2020 at 12:35)</a>:</h4>
<p>I will need to review in more detail, but nothing major seems wrong</p>



<a name="213417786"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213417786" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213417786">(Oct 15 2020 at 12:39)</a>:</h4>
<p>Should I also compile (not test) it on a CI builder? If so, which?</p>



<a name="213418293"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213418293" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213418293">(Oct 15 2020 at 12:43)</a>:</h4>
<p>we should make sure x.py check runs for it</p>



<a name="213418397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213418397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213418397">(Oct 15 2020 at 12:44)</a>:</h4>
<p>And if you think an actual build beyond that is helpful (I'm not actually sure) then tools builder is what I'd suggest</p>



<a name="213418528"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213418528" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213418528">(Oct 15 2020 at 12:45)</a>:</h4>
<p>Check should be enough. I don't do any crazy things that could fail during codegen.</p>



<a name="213423146"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213423146" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213423146">(Oct 15 2020 at 13:18)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> How do I set a config var only for a specific job?</p>



<a name="213423192"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213423192" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213423192">(Oct 15 2020 at 13:18)</a>:</h4>
<p>Can you say more? What do you mean by "job"?</p>



<a name="213423223"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213423223" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213423223">(Oct 15 2020 at 13:18)</a>:</h4>
<p>A CI job</p>



<a name="213423262"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213423262" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213423262">(Oct 15 2020 at 13:18)</a>:</h4>
<p>I would add it to the dockerfile</p>



<a name="213423298"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213423298" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213423298">(Oct 15 2020 at 13:19)</a>:</h4>
<p>sr/cic/docker/host-x86_64/&lt;name of ci builder&gt;/Dockerfile</p>



<a name="213423300"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213423300" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213423300">(Oct 15 2020 at 13:19)</a>:</h4>
<p>I want to set <code>rust.codegen-backends</code> for the check job.</p>



<a name="213423383"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213423383" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213423383">(Oct 15 2020 at 13:19)</a>:</h4>
<p>you'll probably want to do a RUN_CHECK_WITH_CODEGEN_BACKENDS 1 and follow the PARALLEL_QUERIES grep</p>



<a name="213424765"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213424765" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213424765">(Oct 15 2020 at 13:27)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> Does <a href="https://github.com/rust-lang/rust/commit/437058e1f0b52f689993eb345fb123c1a22f5685">https://github.com/rust-lang/rust/commit/437058e1f0b52f689993eb345fb123c1a22f5685</a> look correct?</p>



<a name="213425877"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213425877" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213425877">(Oct 15 2020 at 13:34)</a>:</h4>
<p><span class="user-mention" data-user-id="133247">@bjorn3</span> I would move it up to where the main configure args are set, but yes seems fine</p>



<a name="213425950"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213425950" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213425950">(Oct 15 2020 at 13:35)</a>:</h4>
<p>Should I open a PR once I am done?</p>



<a name="213426094"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213426094" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213426094">(Oct 15 2020 at 13:36)</a>:</h4>
<p>Yes, I think so.</p>



<a name="213427490"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213427490" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213427490">(Oct 15 2020 at 13:47)</a>:</h4>
<p>If CI is gated on cg_clif building, shouldn't it be compiled by default?</p>



<a name="213427906"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213427906" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213427906">(Oct 15 2020 at 13:50)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> ^</p>



<a name="213427974"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213427974" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213427974">(Oct 15 2020 at 13:51)</a>:</h4>
<p>no, I don't think so</p>



<a name="213428016"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213428016" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213428016">(Oct 15 2020 at 13:51)</a>:</h4>
<p>at least I presume that would add a good bit of compile times and seems not necessary</p>



<a name="213428025"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213428025" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213428025">(Oct 15 2020 at 13:51)</a>:</h4>
<p>(for most contributors)</p>



<a name="213428047"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213428047" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213428047">(Oct 15 2020 at 13:51)</a>:</h4>
<p>eventually maybe but not for now</p>



<a name="213428064"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213428064" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213428064">(Oct 15 2020 at 13:51)</a>:</h4>
<p>x.py check should check it by default though</p>



<a name="213428172"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213428172" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213428172">(Oct 15 2020 at 13:52)</a>:</h4>
<p>It adds 2min for me when using <code>./x.py build</code>.</p>



<a name="213428269"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213428269" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213428269">(Oct 15 2020 at 13:52)</a>:</h4>
<p>out of?</p>



<a name="213428305"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213428305" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213428305">(Oct 15 2020 at 13:53)</a>:</h4>
<p>but realistically that feels too long to be acceptable regression at this point</p>



<a name="213428351"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213428351" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213428351">(Oct 15 2020 at 13:53)</a>:</h4>
<div class="codehilite"><pre><span></span><code>Building stage0 compiler artifacts (x86_64-unknown-linux-gnu -&gt; x86_64-unknown-linux-gnu)
[...]
    Finished release [optimized] target(s) in 30m 46s
</code></pre></div>



<a name="213428669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213428669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213428669">(Oct 15 2020 at 13:55)</a>:</h4>
<p>I will make <code>./x.py check</code> enable it by default.</p>



<a name="213428813"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213428813" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213428813">(Oct 15 2020 at 13:56)</a>:</h4>
<p>hm out of 30 minutes I'd be less worried. not sure. I think we should leave it off by default initially anyway, maybe that'll change over time though</p>



<a name="213433485"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213433485" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213433485">(Oct 15 2020 at 14:25)</a>:</h4>
<p>On CI it adds 30s to <code>./x.py check</code>. Most of this is only for the first build, as changing any rustc crate doesn't require a rebuild of Cranelift.</p>



<a name="213491830"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213491830" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213491830">(Oct 15 2020 at 21:43)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116122">simulacrum</span> <a href="#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270/near/213411529">said</a>:</p>
<blockquote>
<p>Hm, ok. I guess that's not something you want to change :)</p>
<p>I wish we already had support for = sysroot deps in cargo.toml, then we could do that sort of integration more easily.</p>
</blockquote>
<p>We'd love to have that in Cargo; someone just needs to propose and write it.</p>



<a name="213491931"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213491931" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213491931">(Oct 15 2020 at 21:44)</a>:</h4>
<p>(That's closely related to std-aware cargo; you'd probably want to coordinate it with <span class="user-mention" data-user-id="120518">@Eric Huss</span> and others.)</p>



<a name="213496714"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Integration%20of%20the%20Cranelift%20backend%20with%E2%80%A6%20compiler-team%23270/near/213496714" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Integration.20of.20the.20Cranelift.20backend.20with.E2.80.A6.20compiler-team.23270.html#213496714">(Oct 15 2020 at 22:38)</a>:</h4>
<p><span aria-label="thumbs up" class="emoji emoji-1f44d" role="img" title="thumbs up">:thumbs_up:</span> I keep trying to find time for this but just haven't gotten cycles yet</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>